import React from 'react';

const Home: React.FC = () => {
  const isLogin = localStorage.getItem('isLogin') === '1';

  return (
    <div style={{ padding: 24 }}>
      <h2>欢迎进入白喜事后台管理系统</h2>
      <p>这是首页内容。</p>
      <div style={{ margin: '24px 0', color: isLogin ? 'green' : 'red', fontWeight: 'bold' }}>
        登录状态：{isLogin ? '已登录' : '未登录'}
      </div>
      <div style={{ margin: '24px 0', padding: '16px', background: 'white', borderRadius: 8, boxShadow: '0 2px 8px rgba(0,0,0,0.1)' }}>
        <h3 style={{ marginTop: 0, marginBottom: 16 }}>系统概览</h3>
        <div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(200px, 1fr))', gap: 16 }}>
          <div style={{ padding: '16px', background: '#f6ffed', borderRadius: 6, border: '1px solid #b7eb8f' }}>
            <div style={{ fontSize: 24, fontWeight: 'bold', color: '#52c41a' }}>1,234</div>
            <div style={{ color: '#666' }}>总用户数</div>
          </div>
          <div style={{ padding: '16px', background: '#fff7e6', borderRadius: 6, border: '1px solid #ffd591' }}>
            <div style={{ fontSize: 24, fontWeight: 'bold', color: '#fa8c16' }}>567</div>
            <div style={{ color: '#666' }}>今日订单</div>
          </div>
          <div style={{ padding: '16px', background: '#f0f5ff', borderRadius: 6, border: '1px solid #adc6ff' }}>
            <div style={{ fontSize: 24, fontWeight: 'bold', color: '#1890ff' }}>89</div>
            <div style={{ color: '#666' }}>商品总数</div>
          </div>
          <div style={{ padding: '16px', background: '#fff1f0', borderRadius: 6, border: '1px solid #ffccc7' }}>
            <div style={{ fontSize: 24, fontWeight: 'bold', color: '#ff4d4f' }}>12</div>
            <div style={{ color: '#666' }}>待处理</div>
          </div>
        </div>
      </div>
    </div>
  );
};

export default Home; 